import { defineStore } from "pinia";

interface IData {
    data: {
        parentTitle?: string
        title?: string
        parentPath?: string
    }
}
interface Imeta {
    parentTitle?: string
    title?: string
    parentPath?: string
}
export const usebrdeadcrumb = defineStore('brdeadcrumb', {
    state: (): IData => {
        return {
            data: {
                parentTitle: '首页',
                title: '',
                parentPath: '/index'
            }

        }
    },
    actions: {
        chegebrdeadarr(meta: Imeta) {
            this.data.parentTitle = meta.parentTitle;
            this.data.title = meta.title;
            this.data.parentPath = meta.parentPath;
        }
    }
})